document.onmouseup= function() {
if(window.getSelection().toString() !==""){
chrome.extension.sendMessage({
			cmd:window.getSelection().toString()	
}, function(response) {
})
chrome.runtime.onMessage.addListener(  function(request, sender, sendResponse) { 
var m=document.createElement("div");m.id="yddWrappers";console.log(m);m.setAttribute("draggable",!0); document.body.appendChild(m);

var n=document.createElement("template");n.id="hxx";
      n.style.display="none";n.innerHTML='<style> @import "'+chrome.extension.getURL('1.css')+'";</style><div id="huaci" class="fadeIn"><div id="yddContainer"><div class="yddTop"></div><div class="yddMiddle"><div class="ydd-trans-wrapper"><div class="ydd-tabs"><span class="ydd-tab">网络图片</span></div><div class="ydd-trans-container"><img width="254" height="100%" src="'+request.sb+'"></div></div><div class="ydd-trans-wrapper"><div class="ydd-trans-container"><font size="5">'+request.cmd+'</font><br></div></div></div></div></div>';
document.body.appendChild(n);
var host = document.querySelector("#yddWrappers")
  var tp = document.querySelector("#hxx")
  var clone = document.importNode(tp.content, true)
  host.createShadowRoot().appendChild(clone)
$("#yddWrappers").attr('style','position: fixed;top: 50px;right: 250px;bottom:10px;z-index: 5555;');
console.log(request.cmd+request.sb);
})}
}